package com.zysf.library_boot.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 
 * @TableName reader_comment
 */
@AllArgsConstructor
@NoArgsConstructor
@TableName(value ="reader_comment")
@Data
public class ReaderComment implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 
     */
    private Integer readerid;

    /**
     * 
     */
    private Integer postsid;

    /**
     * 
     */
    private String readercomment;

    /**
     * 
     */
    private Date commenttime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ReaderComment other = (ReaderComment) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getReaderid() == null ? other.getReaderid() == null : this.getReaderid().equals(other.getReaderid()))
            && (this.getPostsid() == null ? other.getPostsid() == null : this.getPostsid().equals(other.getPostsid()))
            && (this.getReadercomment() == null ? other.getReadercomment() == null : this.getReadercomment().equals(other.getReadercomment()))
            && (this.getCommenttime() == null ? other.getCommenttime() == null : this.getCommenttime().equals(other.getCommenttime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getReaderid() == null) ? 0 : getReaderid().hashCode());
        result = prime * result + ((getPostsid() == null) ? 0 : getPostsid().hashCode());
        result = prime * result + ((getReadercomment() == null) ? 0 : getReadercomment().hashCode());
        result = prime * result + ((getCommenttime() == null) ? 0 : getCommenttime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", readerid=").append(readerid);
        sb.append(", postsid=").append(postsid);
        sb.append(", readercomment=").append(readercomment);
        sb.append(", commenttime=").append(commenttime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}